3.1198 \(\int (a+b \tan (e+f x))^2 (c+d \tan (e+f x))^2 \, dx\)
Optimal. Leaf size=131 \[ \frac{b \left (2 a c d+b \left (c^2-d^2\right )\right ) \tan (e+f x)}{f}+\frac{c d (a+b \tan (e+f x))^2}{f}-\frac{2 (a d+b c) (a c-b d) \log (\cos (e+f x))}{f}+x (a c-a d-b c-b d) (a c+a d+b c-b d)+\frac{d^2 (a+b \tan (e+f x))^3}{3 b f} \]
[Out]
(a*c - b*c - a*d - b*d)*(a*c + b*c + a*d - b*d)*x - (2*(b*c + a*d)*(a*c - b*d)*Log[Cos[e + f*x]])/f + (b*(2*a*
c*d + b*(c^2 - d^2))*Tan[e + f*x])/f + (c*d*(a + b*Tan[e + f*x])^2)/f + (d^2*(a + b*Tan[e + f*x])^3)/(3*b*f)
________________________________________________________________________________________
Rubi [A] time = 0.1866, antiderivative size = 131, normalized size of antiderivative = 1.,
number of steps used = 4, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used =
{3543, 3528, 3525, 3475} \[ \frac{b \left (2 a c d+b \left (c^2-d^2\right )\right ) \tan (e+f x)}{f}+\frac{c d (a+b \tan (e+f x))^2}{f}-\frac{2 (a d+b c) (a c-b d) \log (\cos (e+f x))}{f}+x (a c-a d-b c-b d) (a c+a d+b c-b d)+\frac{d^2 (a+b \tan (e+f x))^3}{3 b f} \]
Antiderivative was successfully verified.
[In]
Int[(a + b*Tan[e + f*x])^2*(c + d*Tan[e + f*x])^2,x]
[Out]
(a*c - b*c - a*d - b*d)*(a*c + b*c + a*d - b*d)*x - (2*(b*c + a*d)*(a*c - b*d)*Log[Cos[e + f*x]])/f + (b*(2*a*
c*d + b*(c^2 - d^2))*Tan[e + f*x])/f + (c*d*(a + b*Tan[e + f*x])^2)/f + (d^2*(a + b*Tan[e + f*x])^3)/(3*b*f)
Rule 3543
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[
(d^2*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Int[(a + b*Tan[e + f*x])^m*Simp[c^2 - d^2 + 2*c*d*Tan[e
+ f*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && !LeQ[m, -1] && !(EqQ[m, 2] && EqQ
[a, 0])
Rule 3528
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(d
*(a + b*Tan[e + f*x])^m)/(f*m), x] + Int[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x
], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]
Rule 3525
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c - b
*d)*x, x] + (Dist[b*c + a*d, Int[Tan[e + f*x], x], x] + Simp[(b*d*Tan[e + f*x])/f, x]) /; FreeQ[{a, b, c, d, e
, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]
Rule 3475
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]
Rubi steps
\begin{align*} \int (a+b \tan (e+f x))^2 (c+d \tan (e+f x))^2 \, dx &=\frac{d^2 (a+b \tan (e+f x))^3}{3 b f}+\int (a+b \tan (e+f x))^2 \left (c^2-d^2+2 c d \tan (e+f x)\right ) \, dx\\ &=\frac{c d (a+b \tan (e+f x))^2}{f}+\frac{d^2 (a+b \tan (e+f x))^3}{3 b f}+\int (a+b \tan (e+f x)) \left (-2 b c d+a \left (c^2-d^2\right )+\left (2 a c d+b \left (c^2-d^2\right )\right ) \tan (e+f x)\right ) \, dx\\ &=(a c-b c-a d-b d) (a c+b c+a d-b d) x+\frac{b \left (2 a c d+b \left (c^2-d^2\right )\right ) \tan (e+f x)}{f}+\frac{c d (a+b \tan (e+f x))^2}{f}+\frac{d^2 (a+b \tan (e+f x))^3}{3 b f}+(2 (b c+a d) (a c-b d)) \int \tan (e+f x) \, dx\\ &=(a c-b c-a d-b d) (a c+b c+a d-b d) x-\frac{2 (b c+a d) (a c-b d) \log (\cos (e+f x))}{f}+\frac{b \left (2 a c d+b \left (c^2-d^2\right )\right ) \tan (e+f x)}{f}+\frac{c d (a+b \tan (e+f x))^2}{f}+\frac{d^2 (a+b \tan (e+f x))^3}{3 b f}\\ \end{align*}
Mathematica [C] time = 1.06668, size = 185, normalized size = 1.41 \[ \frac{3 \left (2 a c d+b \left (d^2-c^2\right )\right ) \left (-2 b^2 \tan (e+f x)+i \left ((a+i b)^2 \log (-\tan (e+f x)+i)-(a-i b)^2 \log (\tan (e+f x)+i)\right )\right )+6 c d \left (6 a b^2 \tan (e+f x)+(-b+i a)^3 \log (-\tan (e+f x)+i)-(b+i a)^3 \log (\tan (e+f x)+i)+b^3 \tan ^2(e+f x)\right )+2 d^2 (a+b \tan (e+f x))^3}{6 b f} \]
Antiderivative was successfully verified.
[In]
Integrate[(a + b*Tan[e + f*x])^2*(c + d*Tan[e + f*x])^2,x]
[Out]
(2*d^2*(a + b*Tan[e + f*x])^3 + 3*(2*a*c*d + b*(-c^2 + d^2))*(I*((a + I*b)^2*Log[I - Tan[e + f*x]] - (a - I*b)
^2*Log[I + Tan[e + f*x]]) - 2*b^2*Tan[e + f*x]) + 6*c*d*((I*a - b)^3*Log[I - Tan[e + f*x]] - (I*a + b)^3*Log[I
+ Tan[e + f*x]] + 6*a*b^2*Tan[e + f*x] + b^3*Tan[e + f*x]^2))/(6*b*f)
________________________________________________________________________________________
Maple [B] time = 0.005, size = 287, normalized size = 2.2 \begin{align*}{\frac{{b}^{2}{d}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{3\,f}}+{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{2}ab{d}^{2}}{f}}+{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{2}{b}^{2}cd}{f}}+{\frac{{a}^{2}\tan \left ( fx+e \right ){d}^{2}}{f}}+4\,{\frac{abcd\tan \left ( fx+e \right ) }{f}}+{\frac{{b}^{2}{c}^{2}\tan \left ( fx+e \right ) }{f}}-{\frac{{b}^{2}{d}^{2}\tan \left ( fx+e \right ) }{f}}+{\frac{{a}^{2}\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) cd}{f}}+{\frac{\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ab{c}^{2}}{f}}-{\frac{\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ab{d}^{2}}{f}}-{\frac{\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ){b}^{2}cd}{f}}+{\frac{{a}^{2}\arctan \left ( \tan \left ( fx+e \right ) \right ){c}^{2}}{f}}-{\frac{{a}^{2}\arctan \left ( \tan \left ( fx+e \right ) \right ){d}^{2}}{f}}-4\,{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ) abcd}{f}}-{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ){b}^{2}{c}^{2}}{f}}+{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ){b}^{2}{d}^{2}}{f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((a+b*tan(f*x+e))^2*(c+d*tan(f*x+e))^2,x)
[Out]
1/3/f*b^2*d^2*tan(f*x+e)^3+1/f*tan(f*x+e)^2*a*b*d^2+1/f*tan(f*x+e)^2*b^2*c*d+1/f*a^2*tan(f*x+e)*d^2+4/f*a*b*c*
d*tan(f*x+e)+1/f*b^2*c^2*tan(f*x+e)-1/f*b^2*d^2*tan(f*x+e)+1/f*a^2*ln(1+tan(f*x+e)^2)*c*d+1/f*ln(1+tan(f*x+e)^
2)*a*b*c^2-1/f*ln(1+tan(f*x+e)^2)*a*b*d^2-1/f*ln(1+tan(f*x+e)^2)*b^2*c*d+1/f*a^2*arctan(tan(f*x+e))*c^2-1/f*a^
2*arctan(tan(f*x+e))*d^2-4/f*arctan(tan(f*x+e))*a*b*c*d-1/f*arctan(tan(f*x+e))*b^2*c^2+1/f*arctan(tan(f*x+e))*
b^2*d^2
________________________________________________________________________________________
Maxima [A] time = 1.7921, size = 215, normalized size = 1.64 \begin{align*} \frac{b^{2} d^{2} \tan \left (f x + e\right )^{3} + 3 \,{\left (b^{2} c d + a b d^{2}\right )} \tan \left (f x + e\right )^{2} - 3 \,{\left (4 \, a b c d -{\left (a^{2} - b^{2}\right )} c^{2} +{\left (a^{2} - b^{2}\right )} d^{2}\right )}{\left (f x + e\right )} + 3 \,{\left (a b c^{2} - a b d^{2} +{\left (a^{2} - b^{2}\right )} c d\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right ) + 3 \,{\left (b^{2} c^{2} + 4 \, a b c d +{\left (a^{2} - b^{2}\right )} d^{2}\right )} \tan \left (f x + e\right )}{3 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*tan(f*x+e))^2*(c+d*tan(f*x+e))^2,x, algorithm="maxima")
[Out]
1/3*(b^2*d^2*tan(f*x + e)^3 + 3*(b^2*c*d + a*b*d^2)*tan(f*x + e)^2 - 3*(4*a*b*c*d - (a^2 - b^2)*c^2 + (a^2 - b
^2)*d^2)*(f*x + e) + 3*(a*b*c^2 - a*b*d^2 + (a^2 - b^2)*c*d)*log(tan(f*x + e)^2 + 1) + 3*(b^2*c^2 + 4*a*b*c*d
+ (a^2 - b^2)*d^2)*tan(f*x + e))/f
________________________________________________________________________________________
Fricas [A] time = 1.515, size = 343, normalized size = 2.62 \begin{align*} \frac{b^{2} d^{2} \tan \left (f x + e\right )^{3} - 3 \,{\left (4 \, a b c d -{\left (a^{2} - b^{2}\right )} c^{2} +{\left (a^{2} - b^{2}\right )} d^{2}\right )} f x + 3 \,{\left (b^{2} c d + a b d^{2}\right )} \tan \left (f x + e\right )^{2} - 3 \,{\left (a b c^{2} - a b d^{2} +{\left (a^{2} - b^{2}\right )} c d\right )} \log \left (\frac{1}{\tan \left (f x + e\right )^{2} + 1}\right ) + 3 \,{\left (b^{2} c^{2} + 4 \, a b c d +{\left (a^{2} - b^{2}\right )} d^{2}\right )} \tan \left (f x + e\right )}{3 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*tan(f*x+e))^2*(c+d*tan(f*x+e))^2,x, algorithm="fricas")
[Out]
1/3*(b^2*d^2*tan(f*x + e)^3 - 3*(4*a*b*c*d - (a^2 - b^2)*c^2 + (a^2 - b^2)*d^2)*f*x + 3*(b^2*c*d + a*b*d^2)*ta
n(f*x + e)^2 - 3*(a*b*c^2 - a*b*d^2 + (a^2 - b^2)*c*d)*log(1/(tan(f*x + e)^2 + 1)) + 3*(b^2*c^2 + 4*a*b*c*d +
(a^2 - b^2)*d^2)*tan(f*x + e))/f
________________________________________________________________________________________
Sympy [A] time = 0.61167, size = 258, normalized size = 1.97 \begin{align*} \begin{cases} a^{2} c^{2} x + \frac{a^{2} c d \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{f} - a^{2} d^{2} x + \frac{a^{2} d^{2} \tan{\left (e + f x \right )}}{f} + \frac{a b c^{2} \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{f} - 4 a b c d x + \frac{4 a b c d \tan{\left (e + f x \right )}}{f} - \frac{a b d^{2} \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{f} + \frac{a b d^{2} \tan ^{2}{\left (e + f x \right )}}{f} - b^{2} c^{2} x + \frac{b^{2} c^{2} \tan{\left (e + f x \right )}}{f} - \frac{b^{2} c d \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{f} + \frac{b^{2} c d \tan ^{2}{\left (e + f x \right )}}{f} + b^{2} d^{2} x + \frac{b^{2} d^{2} \tan ^{3}{\left (e + f x \right )}}{3 f} - \frac{b^{2} d^{2} \tan{\left (e + f x \right )}}{f} & \text{for}\: f \neq 0 \\x \left (a + b \tan{\left (e \right )}\right )^{2} \left (c + d \tan{\left (e \right )}\right )^{2} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*tan(f*x+e))**2*(c+d*tan(f*x+e))**2,x)
[Out]
Piecewise((a**2*c**2*x + a**2*c*d*log(tan(e + f*x)**2 + 1)/f - a**2*d**2*x + a**2*d**2*tan(e + f*x)/f + a*b*c*
*2*log(tan(e + f*x)**2 + 1)/f - 4*a*b*c*d*x + 4*a*b*c*d*tan(e + f*x)/f - a*b*d**2*log(tan(e + f*x)**2 + 1)/f +
a*b*d**2*tan(e + f*x)**2/f - b**2*c**2*x + b**2*c**2*tan(e + f*x)/f - b**2*c*d*log(tan(e + f*x)**2 + 1)/f + b
**2*c*d*tan(e + f*x)**2/f + b**2*d**2*x + b**2*d**2*tan(e + f*x)**3/(3*f) - b**2*d**2*tan(e + f*x)/f, Ne(f, 0)
), (x*(a + b*tan(e))**2*(c + d*tan(e))**2, True))
________________________________________________________________________________________
Giac [B] time = 3.30342, size = 3048, normalized size = 23.27 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*tan(f*x+e))^2*(c+d*tan(f*x+e))^2,x, algorithm="giac")
[Out]
1/3*(3*a^2*c^2*f*x*tan(f*x)^3*tan(e)^3 - 3*b^2*c^2*f*x*tan(f*x)^3*tan(e)^3 - 12*a*b*c*d*f*x*tan(f*x)^3*tan(e)^
3 - 3*a^2*d^2*f*x*tan(f*x)^3*tan(e)^3 + 3*b^2*d^2*f*x*tan(f*x)^3*tan(e)^3 - 3*a*b*c^2*log(4*(tan(e)^2 + 1)/(ta
n(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^
3*tan(e)^3 - 3*a^2*c*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 +
tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 + 3*b^2*c*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^
2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 + 3*a
*b*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*
tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 - 9*a^2*c^2*f*x*tan(f*x)^2*tan(e)^2 + 9*b^2*c^2*f*x*tan(f*x)^2*tan(e
)^2 + 36*a*b*c*d*f*x*tan(f*x)^2*tan(e)^2 + 9*a^2*d^2*f*x*tan(f*x)^2*tan(e)^2 - 9*b^2*d^2*f*x*tan(f*x)^2*tan(e)
^2 + 3*b^2*c*d*tan(f*x)^3*tan(e)^3 + 3*a*b*d^2*tan(f*x)^3*tan(e)^3 + 9*a*b*c^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^
4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e
)^2 + 9*a^2*c*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*
x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 - 9*b^2*c*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*t
an(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 - 9*a*b*d^2*
log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x
)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 - 3*b^2*c^2*tan(f*x)^3*tan(e)^2 - 12*a*b*c*d*tan(f*x)^3*tan(e)^2 - 3*a^2*d^
2*tan(f*x)^3*tan(e)^2 + 3*b^2*d^2*tan(f*x)^3*tan(e)^2 - 3*b^2*c^2*tan(f*x)^2*tan(e)^3 - 12*a*b*c*d*tan(f*x)^2*
tan(e)^3 - 3*a^2*d^2*tan(f*x)^2*tan(e)^3 + 3*b^2*d^2*tan(f*x)^2*tan(e)^3 + 9*a^2*c^2*f*x*tan(f*x)*tan(e) - 9*b
^2*c^2*f*x*tan(f*x)*tan(e) - 36*a*b*c*d*f*x*tan(f*x)*tan(e) - 9*a^2*d^2*f*x*tan(f*x)*tan(e) + 9*b^2*d^2*f*x*ta
n(f*x)*tan(e) + 3*b^2*c*d*tan(f*x)^3*tan(e) + 3*a*b*d^2*tan(f*x)^3*tan(e) - 3*b^2*c*d*tan(f*x)^2*tan(e)^2 - 3*
a*b*d^2*tan(f*x)^2*tan(e)^2 + 3*b^2*c*d*tan(f*x)*tan(e)^3 + 3*a*b*d^2*tan(f*x)*tan(e)^3 - b^2*d^2*tan(f*x)^3 -
9*a*b*c^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2
- 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) - 9*a^2*c*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3
*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) + 9*b^2*c*d*log(4*(tan(e)
^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)
)*tan(f*x)*tan(e) + 9*a*b*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan
(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) + 6*b^2*c^2*tan(f*x)^2*tan(e) + 24*a*b*c*d*tan(f*
x)^2*tan(e) + 6*a^2*d^2*tan(f*x)^2*tan(e) - 9*b^2*d^2*tan(f*x)^2*tan(e) + 6*b^2*c^2*tan(f*x)*tan(e)^2 + 24*a*b
*c*d*tan(f*x)*tan(e)^2 + 6*a^2*d^2*tan(f*x)*tan(e)^2 - 9*b^2*d^2*tan(f*x)*tan(e)^2 - b^2*d^2*tan(e)^3 - 3*a^2*
c^2*f*x + 3*b^2*c^2*f*x + 12*a*b*c*d*f*x + 3*a^2*d^2*f*x - 3*b^2*d^2*f*x - 3*b^2*c*d*tan(f*x)^2 - 3*a*b*d^2*ta
n(f*x)^2 + 3*b^2*c*d*tan(f*x)*tan(e) + 3*a*b*d^2*tan(f*x)*tan(e) - 3*b^2*c*d*tan(e)^2 - 3*a*b*d^2*tan(e)^2 + 3
*a*b*c^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 -
2*tan(f*x)*tan(e) + 1)) + 3*a^2*c*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)
^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) - 3*b^2*c*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*t
an(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) - 3*a*b*d^2*log(4*(tan(e)^2 + 1)
/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) - 3*b
^2*c^2*tan(f*x) - 12*a*b*c*d*tan(f*x) - 3*a^2*d^2*tan(f*x) + 3*b^2*d^2*tan(f*x) - 3*b^2*c^2*tan(e) - 12*a*b*c*
d*tan(e) - 3*a^2*d^2*tan(e) + 3*b^2*d^2*tan(e) - 3*b^2*c*d - 3*a*b*d^2)/(f*tan(f*x)^3*tan(e)^3 - 3*f*tan(f*x)^
2*tan(e)^2 + 3*f*tan(f*x)*tan(e) - f)